package com.example.test.slice;

import com.example.test.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Text;

public class MainAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_welcome_login);

        Text text = (Text) findComponentById(ResourceTable.Id_welcome_login);
        String usersname = intent.getStringParam("username");
        text.setText("欢迎"+usersname+"\n参与软通2022师资培训");
}

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
